$env:VIM_PATH = "~\AppData\Local\nvim"
$LASTDIR = ""
Function tnshutdown{
    Stop-Computer
}

Function tnreboot{
    Restart-Computer
}

function ce{
    ssh -p 22 zzx@192.168.3.104
}

function wsl{
    wsl.exe -d Ubuntu-20.04
}


# Chocolatey profile
# $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
# if (Test-Path($ChocolateyProfile)) {
#   Import-Module "$ChocolateyProfile"
# }

Function f{
    $dst=$(vifm --choose-dir -)
    echo $dst | clip.exe
    $dst2 = $(echo $dst | D:\bin\change.exe)
    echo $dst2 | clip.exe
    cd $dst2
    # echo $dst | D:\bin\change.exe | cd
}

$DirPath = "~\.config\vifm\lastdir"
Function fn{
    if (Test-Path("$DirPath")){
        rm $DirPath
    }
    vifm
    # echo $pwd > ~\.config\vifm\lastdir
    # echo $LASTDIR > ~\.config\vifm\lastdir.abc
    if (Test-Path("$DirPath")){
        cat $DirPath | D:\bin\change.exe | cd
    }
}

Set-Alias -Name e -Value nvim
Set-Alias -Name c -Value cls
